test= {'test1':'data1','test2':'data2'}
# test= {'test1':'data1'}
# test = {}
if len(test):
    print(len(test))


test1 = ', '.join(test.values())
print("test1",test1)
test2 = '='.join(test.keys())
print(test2)
test3 = ' and '.join(('%s=:%s')  %(k,k) for k in test.keys())
print(test3)

import sqlite3
import string

# def char_generator():
#     for c in string.ascii_lowercase:
#         yield (c,)

conn = sqlite3.connect(r"e:\A_Code\GIT\Requirement_Management\小账本\accountBook\data\test.db")
# conn.row_factory = sqlite3.Row
cur = conn.cursor()
# cur.execute("create table characters(c)")

# cur.executemany("insert into characters(c) values (?)", char_generator())

cur.execute("select * from mySequence")
# c=cur.fetchone()
# print(type(c))
# print(cur.fetchone().keys())
# for a in cur.execute("select name, id from mySequence"):
#     print(a)

col_name_list = [tuple[0] for tuple in cur.description]  
print(col_name_list )

# # cur.execute("PRAGMA table_info(mySequence)")  
# # print (cur.fetchall()  )

# for row in cur:
#     assert row[0] == row["name"]
#     assert row["name_last"] == row["nAmE_lAsT"]
#     assert row[1] == row["id"]
#     assert row[1] == row["AgE"]